﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

namespace HalatiAlmadania.com._4idev.halatialmadania.utils
{
    public class Order
    {
        private String column;

        private String ord;

        private Order(String column, String ord) {
            this.column = column;
            this.ord = ord;
        }

        public static Order asc(String col) {
            return new Order(col,"asc");
        }

        public static Order desc(String col)
        {
            return new Order(col, "desc");
        }

        public String toSql() {
            return String.Format(" order by {0} {1} ", new Object[] { column, ord });
        }
    }
}
